import request from '../utils/request';

export const fetchUserListData = query => {
    return request({
        url: '/user/list',
        method: 'post',
        params: {},
        data: query
    });
};


export const fetchUserRegisterData = query => {
    return request({
        url: '/user/register',
        method: 'post',
        params: {},
        data: query
    });
};

/**------------用户更新------------- */
export const fetchUserUpdateData = query => {
    return request({
        url: '/user/update',
        method: 'post',
        params: {},
        data: query
    });
};

export const fetchUsernameDuplicatedData = query => {
    return request({
        url: '/user/checkUsername',
        method: 'post',
        params: {
            "username": query
        }
    });
};

/*-------------用户登录-------------------*/
export const fetchUserLoginData = queryData => {
    return request({
        url: '/user/login',
        method: 'post',
        params: {},
        data: queryData
    });
};
